package com.pkx.cloud.fse7.dms.openrecord.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pkx.cloud.fse7.dms.openrecord.repo.OpenRecordMonthMapper;
import com.pkx.cloud.fse7.dms.openrecord.service.OpenRecordMonthService;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 服务实现类
 *
 * @author chenwg
 * @since 2020-10-14
 */
@Service
public class OpenRecordMonthServiceImpl implements OpenRecordMonthService {

    @Resource
    private OpenRecordMonthMapper openRecordMonthMapper;

    @Override
    @Cacheable(cacheNames = "month",key = "#page.current+':'+#page.size+':'+#devName")
    public Page pageList(Page page, String devName) {
        return openRecordMonthMapper.list(page, devName);
    }

    @Override
    public List list() {
        return openRecordMonthMapper.list();
    }
}
